<template>
    <div class="yinsi">

        <div class="rivacypolicy-box" v-html="content">
        </div>

    </div>
</template>
<script>
import { onepage } from ".././../utils/api"

export default {
    components: {

    },
    data() {
        return {
            content: "",
            lang: 'zh',
            type: "",

        }
    },
    created() {
        this.$i18n.locale = localStorage.getItem('langtype')
        this.lang = localStorage.getItem('langtype')
        
        if (this.$route.query.index == 0) {
            if (this.$i18n.locale == 'en') {
                this.type = "privacy_englist"
            } else {
                this.type = "privacy"
            }
        }
        if (this.$route.query.index == 1) {
            this.type = "useragreement"
        }
        if (this.$route.query.index == 2) {
            if (this.$i18n.locale == 'en') {
                this.type = "server_englist"
            } else {
                this.type = "server"
            }
        }

    },
    mounted() {
        this.genAboutus()
    },
    methods: {
        async genAboutus() {
            let res = await onepage({
                name: this.type
            })
            if (res.code == 1) {
                this.content = res.data
            }
        }

    },

}
</script>

<style scoped lang="scss">
@media screen and (max-width: 750px) {
    .yinsi {
        width: 100%;
        padding: 30px;
        box-sizing: border-box;
    }
}

@media screen and (min-width: 751px) and (max-width: 1300px) {
    .yinsi {
        width: 100%;
        padding: 60px;
        box-sizing: border-box;
    }
}
</style>